package com.xiaoshuidi.cloud.module.finance.api.finance;

import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.module.finance.api.finance.dto.FinanceMoneyFlowRespDTO;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@Tag(name = "RPC 服务 - 财务管理")
@FeignClient(name = "lease-finance-server")
public interface FinanceMoneyFlowApi {

    /**
     * 获得流水明细信息
     * @param id
     * @param sourceBizId
     * @param sourceBizType
     * @return
     */
    @GetMapping("/rpc-api/finance/moneyFlow/getApp")
    CommonResult<FinanceMoneyFlowRespDTO> getApp(@RequestParam(value = "id", required = false) Long id, @RequestParam(value = "sourceBizId", required = false) String sourceBizId,
                                                 @RequestParam(value = "sourceBizType", required = false) String sourceBizType);

    /**
     * 明细列表
     * @param sourceBizId
     * @param sourceBizType
     * @return
     */
    @GetMapping("/rpc-api/finance/moneyFlow/get-list")
    public CommonResult<List<FinanceMoneyFlowRespDTO>> getAppList(@RequestParam(value = "sourceBizId", required = false) String sourceBizId,
                                                                  @RequestParam(value = "sourceBizType", required = false) String sourceBizType);
}
